package my.datastructures;

public class Node
{
    public Node(int _value)
    {
        value = _value;
    }
    
    public Node(int _value, Node _next)
    {
        value = _value;
        next = _next;
    }
    
    public int value;
    public Node next;
    
    public void print()
    {
        Node node = this; 
        while (node !=null)
        {
            System.out.print(node.value + " ");
            node = node.next;
        }
    }
}
